package com.heima.user.controller.v1;


import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.behavior.dtos.UserRelationDto;
import com.heima.user.service.UserBehaviorService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/user")
@Slf4j
@Api(value = "app端用户关注作者相关接口",tags = "app端用户关注作者相关接口")
public class UserBehaviorController {


    @Autowired
    private UserBehaviorService userBehaviorService;

    @PostMapping("/user_follow")
    @ApiOperation("用户关注/取消关注 作者")
    public ResponseResult follow(@RequestBody UserRelationDto dto){
        return userBehaviorService.follow(dto);
    }
}
